package edu.tgc.entity.hrm;

import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;

import edu.tgc.entity.system.BaseEntity;
@Entity
public class IdCade extends BaseEntity{
	//身份证号
	private String idNo;
	//姓名
	private String name;
	//性别
	private String sex;
	//民族
	private String nation;
	//生日
	private Date born;
	//地址
	private String address;
	//照片名称
	private String photo;
	//有效期起
	private Date userLifeB;
	//有效期止
	private Date userLifeE;
	//发证机关
	private String police;
	private Boolean isUsed=false;
	
	private static String path="d:/bzzy/idCadePhoto"; 
	
	public IdCade() {
		super();
	}
	

	public IdCade(UUID id) {
		super();
		this.id=id;
	}
	
	public IdCade(String idNo) {
		super(UUID.randomUUID());
		this.idNo = idNo;
	}


	@Column(length=18)
	public String getIdNo() {
		return idNo;
	}


	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}


	public Boolean getIsUsed() {
		return isUsed;
	}


	public void setIsUsed(Boolean isUsed) {
		this.isUsed = isUsed;
	}


	@Temporal(value=TemporalType.DATE)
	public Date getBorn() {
		return born;
	}


	public void setBorn(Date born) {
		this.born = born;
	}


	public String getAddress() {
		return address;
	}


	public void setAddress(String address) {
		this.address = address;
	}

	@Temporal(value=TemporalType.DATE)
	public Date getUserLifeB() {
		return userLifeB;
	}


	public void setUserLifeB(Date userLifeB) {
		this.userLifeB = userLifeB;
	}


	@Temporal(value=TemporalType.DATE)
	public Date getUserLifeE() {
		return userLifeE;
	}


	public void setUserLifeE(Date userLifeE) {
		this.userLifeE = userLifeE;
	}


	public String getPolice() {
		return police;
	}


	public void setPolice(String police) {
		this.police = police;
	}


	@Column(length=50)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Column(length=2)
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Column(length=10)
	public String getNation() {
		return nation;
	}


	public void setNation(String nation) {
		this.nation = nation;
	}


	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}
	
	@Transient
	@JsonIgnore
	public static String getPath() {
		return path;
	}

	public static void setPath(String path) {
		IdCade.path = path;
	}


	
}
